import java.util.Scanner;

/**
 * @author yu
 * @date 2025年04月17日 8:59
 */
public class _09_dp_01_509_fib {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
        scanner.close();
    }
    public static int fib(int n){
        if(n < 2) return n;
        int[] dp = new int[n+1];
        dp[0] = 0;
        dp[1] = 1;
        for(int index = 2; index <= n; index++){
            dp[index] = dp[index - 1]+dp[index - 2];
        }
        return dp[n];
    }
}
